<?php

class Event extends AppModel {

    var $name = 'Event';

    var $validate = array(
        'capacity' => array(
           'rule' => array('comparison','>=',2),
           'message' => 'Capacity must be greater than one'
        ),
        'event_start' => array(
            'rule' => 'notEmpty',
            'message' => 'This field is required.'
        ),
        'event_end' => array(
            'rule' => 'notEmpty',
            'message' => 'This field is required.'
        ),        
        'rsvp_start' => array(
            'rule' => 'notEmpty',
            'message' => 'This field is required.'
        ),
        'rsvp_end' => array(
            'rule' => 'notEmpty',
            'message' => 'This field is required.'
        ),
        'event_name' => array(
            'rule' => 'notEmpty',
            'message' => 'This field is required.'
        ),
        'event_type' => array(
            'rule' => 'notEmpty',
            'message' =>'This field is required.'
        ),
        'venue_addr1' => array(
            'rule' => 'notEmpty',
            'message' =>'This field is required.'
        ),
        'venue_city' => array(
            'rule' => 'notEmpty',
            'message' =>'This field is required.'
        ),
        'venue_state' => array(
            'rule' => 'notEmpty',
            'message' =>'This field is required.'
        ),
        'venue_postal' => array(
            'rule' => array('postal', null, 'us'),
            'message' => 'Please enter a valid postal code.'
        )
    );
}

?>